<div id="actionbar" class="fn-clear">
    <form id="form" action="{:url('store.index/selectStore')}" method="get">
        <input type="hidden" name="input" value="{$input}" />
        <input placeholder="请输入好店名称" class="input w200" type="text" name="keyword" value="{$keyword}" />
        <input type="submit" value="搜索" class="button button-blue" />
    </form>
</div>
<table class="table table-border">
    <thead>
        <tr>
            <th class="w100">操作</th>
            <th class="w60 fn-tac"></th>
            <th>好店名称</th>
            <th>店铺地址</th>
            <th class="w140">联系电话</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td><a href="javascript:;" class="button selectID" title="选择" data-id="{$select_uid?$vo.manage_uid:$vo.id}" data-name="{$vo.name}"><i class="iconfont icon-text_icon"></i>选择</a></td>
            <td class="fn-tac"><img src="{$vo.img}" class="w40" /></td>
            <td>{$vo.name} </td>
            <td>{$vo.address}</td>
            <td>{$vo.telphone}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
    Do('base','layer',function(){
        var index = parent.layer.getFrameIndex(window.name);
        $('.selectID').click(function(){
            var store = {
                'store_name':$(this).attr('data-name'),
                'id':$(this).attr('data-id'),
            }
            parent.$("#"+$('body').attr("class"))[0].contentWindow.setState(store);
            parent.layer.close(index); 
        });
    })
</script>